<template>
  <div>
    <ul class="jingdian">
      <li v-for="item in jindianList" :key="item.id">
        <div class="con">
          <div class="c-img">
            <img :src="item.img" alt="" />
          </div>
          <div class="c-text">
            <div class="cn">{{ item.nm }}</div>
            <div class="en">{{ item.enm }}</div>
            <div>{{ item.cat }}</div>
            <div>{{ item.pubDesc }}</div>
          </div>
          <div class="c-score">
            <span class="s1">{{ item.sc }}</span>
            <span>分</span>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Jingdian",
  data() {
    return {
      jindianList: [],
    };
  },
  mounted() {
    axios.get("./json/jingdian.json").then((res) => {
      console.log(res);
      this.jindianList = res.data.classicMovies.list;
    });
  },
};
</script>

<style lang="less" scoped>
.con {
  width: 100%;
  height: 2.9333rem;
  background: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: auto;
  line-height: 0.5333rem;

  .c-img {
    padding-left: 0.4rem;
    img {
      width: 1.7067rem;
      height: 2.4rem;
    }
  }
  .c-text {
    font-size: 13px;
    color: #666;
    padding-right: 0.6667rem;
    .cn {
      font-size: 17px;
      font-weight: bold;
      color: #333;
    }
    .en {
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      width: 4.8rem;
    }
  }
  .c-score {
    color: #777;
    padding-bottom: 1.7333rem;
    .s1 {
      color: #faaf00;
      font-size: 15px;
      font-weight: bold;
    }
  }
}
</style>